package per.hx.bs.entity.sys;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import per.hx.bs.base.entity.BaseEntity;

import java.io.Serializable;

/**
 * @author HuXing
 * @date 2018/3/23  16:09
 */
@TableName("sys_dept")
public class SysDeptDO extends BaseEntity<SysDeptDO> {

    /**
     * 部门Id
     */
    @TableId
    private Long deptId;
    /**
     * 部门名称
     */
    private String name;
    /**
     * 上级部门ID，一级部门为0
     */
    private Long parentId;
    /**
     * 排序
     */
    private Integer orderNum;

    private Integer state;


    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Integer getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Integer orderNum) {
        this.orderNum = orderNum;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "SysDeptDO{" +
                "deptId=" + deptId +
                ", name='" + name + '\'' +
                ", parentId=" + parentId +
                ", orderNum=" + orderNum +
                ", state=" + state +
                '}';
    }

    @Override
    protected Serializable pkVal() {
        return this.deptId;
    }
}
